package com.watson.view;

import android.os.CountDownTimer;

import com.watson.interdaces.TimeCallback;


public class MyCountDownTimer extends CountDownTimer {

    private TimeCallback timeCallback;

    public void setTimeCallback(TimeCallback timeCallback) {
        this.timeCallback = timeCallback;
    }

    public MyCountDownTimer(long millisInFuture, long countDownInterval) {
        super(millisInFuture, countDownInterval);
    }

    @Override
    public void onTick(long millisUntilFinished) {
    }

    @Override
    public void onFinish() {
        if (timeCallback != null) {
            timeCallback.onFinish();
        }
    }
}
